Monday, April 3rd, 2023

Note: the image itself is a grayscale image (meaning the red-values, green-values, and blue-values are equal for each pixel). On the other hand, plt.imread() loaded the image with full RGB values (i.e. there is a third dimension of length 3).

Recall from last week: Use np.random.rand to generate salt and pepper noise:

The above code is biased toward salt noise, since we set salt noise second. In other words, we might change previously pepper noised pixels to salt noised pixels.

April 5th, 2023

Let's add a border around this image whose width is pad.